<script>
  export let size = "1em";
  export let color = "currentColor";
  export let open = false;
</script>

<svg
  height={size}
  viewBox="0 0 24 24"
  fill="none"
  xmlns="http://www.w3.org/2000/svg"
>
  <path
    fill-rule="evenodd"
    clip-rule="evenodd"
    d="M22 5.5C22 4.67163 21.3284 4 20.5 4H3.5C2.67163 4 2 4.67163 2 5.5V18.5C2 19.3284 2.67163 20 3.5 20H20.5C21.3284 20 22 19.3284 22 18.5V5.5ZM20.5 6C20.5 5.72386 20.2761 5.5 20 5.5H4C3.72386 5.5 3.5 5.72386 3.5 6V11C3.5 11.2761 3.79274 11.5 4.15385 11.5L19.8462 11.5C20.2073 11.5 20.5 11.2761 20.5 11V6ZM20.5 13.5C20.5 13.2239 20.2073 13 19.8462 13H4.15385C3.79274 13 3.5 13.2239 3.5 13.5L3.5 18C3.5 18.2761 3.72386 18.5 4 18.5H20C20.2761 18.5 20.5 18.2761 20.5 18V13.5Z"
    fill={color}
  />
  {#if open}
    <rect x="5" y="14.25" width="14" height="1" rx="0.25" fill={color} />
    <rect x="5" y="16.25" width="14" height="1" rx="0.25" fill={color} />
    <rect x="5" y="14.25" width="14" height="3" rx="0.25" fill={color} />
  {:else}
    <path
      d="M5 15.5C5 15.3619 5.11193 15.25 5.25 15.25H18.75C18.8881 15.25 19 15.3619 19 15.5V16C19 16.1381 18.8881 16.25 18.75 16.25H5.25C5.11193 16.25 5 16.1381 5 16V15.5Z"
      fill="black"
    />
  {/if}
</svg>
